<div id="header">
                   <h1 id="logo"><a href="http://azeroth-gaming.info/">Azeroth-Gaming</a></h1>
		<div id="section">
			<div id="welcome-intro">
				<div id="welcome-right">
				<?php
	if(session_is_registered('user_name') || session_is_registered('admin')) {
	print(" <center><p>Welcome </br><font color='#FFC100'>".$_SESSION['user_name']."</font></p>
</center>
	");}
	else{
	?>
		<a
		class="ui-button button1 "
			href="tos.php"
		>
		<span>
			<span>Join Us NOW!</span>
		</span>
	</a>
<br />


					Already a user? <a href="login.php" onclick="return Login.open('https://azeroth-gaming.info/login.php')">Log In</a>
					<?php } ?>
					
</br>
</br>
<table border=0 width=200><tr><td>
<font size="1" color="#FFFFFF">
<br>
<blockquote>
<h4><a href="#"><?php echo($question); ?></a></h4><br><br>
<h4>
<?php
if($votingstep==1) { echo($step1str); }
if($votingstep==2) { echo($step2str); }
if($votingstep==3) { echo($step3str); }
?></h4><br>
<font size="2">Number of votes: <?php echo($totalvotes); ?></font>
</blockquote></td>
</tr>
</table>
	
				</div>
<?php

 	include("inc/config.php");
	
$conn=mysql_connect($host, $user, $pass) or die();
mysql_select_db($chardb);
if ($fp)
echo "<center><img src=\"images/On.png\" ></center>";
else
echo "<center><img src=\"images/Off.png\"></center>";

if ($fp)
$on = "green";
else
$on = "#FF0000";



  

$sql = "SELECT SUM(online) FROM characters";
$sqlquery = mysql_query($sql) or die(mysql_error());
$memb = mysql_result($sqlquery,0,0);


mysql_selectdb ("$logondb");

$sql = mysql_query("SELECT * FROM `uptime` ORDER BY `starttime` DESC LIMIT 0, 1"); 
$row = mysql_fetch_array($sql);    

$day = floor($row['uptime'] / 86400);
$hour = floor($row['uptime'] / 3600) - $day * 24;
$min = floor($row['uptime'] / 60 / 60);
$uptime_string = $day.'d&nbsp;'.$hour.'h&nbsp;'.$min.'m&nbsp;';
	
$query_max=mysql_query("SELECT maxplayers FROM uptime ORDER BY maxplayers DESC LIMIT 1") or die (mysql_error());
$num_max=mysql_num_rows($query_max);	
$fetch_max=mysql_fetch_array($query_max);
$query_acc=mysql_query("SELECT username, id FROM account ORDER BY id DESC LIMIT 3") or die (mysql_error());
$num_acc=mysql_num_rows($query_acc);	
mysql_selectdb ("$chardb");
$query_cha=mysql_query("SELECT name, guid FROM characters ORDER BY guid DESC LIMIT 3") or die (mysql_error());
$num_cha=mysql_num_rows($query_cha);	
		?>
				<h2><p><a href="online.php"> Online Players:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><strong><a href="online.php"><?php print "<font color='$on'>"?><?php print $memb; ?></a></font></strong><br />
          <a href="http://www.wowwiki.com/Patch_3.3.5">Patch:</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong><?php print "<font color='$on'>"?><u>3.3.5a</u></font></strong><br />
          <a href="download/realmlist.wtf">Setrealmlist:</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong><?php print "<font color='$on'>"?><u>azeroth-gaming.info</u></font></strong><br />
          <a href="#">Server Uptime:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><strong><?php print"<font color='$on'>"?><?php print $uptime_string;?></font></strong><br />
		  <a href="#">Max Online Players:&nbsp;&nbsp;&nbsp;&nbsp;</a><strong><?php print"<font color='$on'>"?><?php print $fetch_max['maxplayers'];?></font></strong><br /></h2>
		  <font size="5"><a href="#">Latest Accounts:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></font><strong><?php print "<font color='$on' size='3'>"; print "| "; while($fetch_acc=mysql_fetch_array($query_acc)) { print $fetch_acc['username']; ?> | <?php }?></font></strong></br>
		  <font size="5"><a href="#">Latest Characters:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></font><strong><?php print "<font color='$on' size='3'>"; print "| "; while($fetch_cha=mysql_fetch_array($query_cha)) { print $fetch_cha['name']; ?> | <?php }?></font></strong></br>
		</p>
			</div>
	<span class="clear"><!-- --></span>
		</div>
                </div>